package com.zhisheng.day10_tlias.aop;
/*
    对DeptService接口中带有Integer参数的方法进行前置增强


 */

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

import java.util.Arrays;

@Aspect
@Component
public class MyAop2 {

    @Before("execution(* com..DeptService.*ById(java.lang.Integer))")
    public void myBefore(JoinPoint jp){
        System.err.println("我们的前置通知执行了..........................获取的参数是:"+ Arrays.toString(jp.getArgs()));
    }

}
